﻿@using NUS.ISS.ARS.BusinessEntity.ViewModels
@model IEnumerable<NUS.ISS.ARS.BusinessEntity.ViewModels.FlightScheduleView>


@{
    ViewBag.Title = "Flight Schedule";
}
@using (Html.BeginForm())
{
<h2>Flight Schedule</h2>
<p>Flight Number:<br />@Html.TextBox("flightnumber")</p>
<p>From Airport Name:<br />@Html.TextBox("fromairportid")</p>
<p>To Airport Name:<br />@Html.TextBox("toairportid")</p>

<p>
<input type="submit" value="Search" />
</p>
<p>
    @Html.ActionLink("Create New", "FlightScheduleCreate", "FlightSchedule")
</p>
}

<table class="table table-striped">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.AirplaneModel)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.FlightNumber)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.FromAirport)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.FromCity)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.ToAirport)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.ToCity)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.ArrivalTime)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.DepartureTime)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.AdultFare)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.ChildFare)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.InfantFare)
        </th>
        <th></th>
    </tr>



    @foreach (FlightScheduleView item in Model)
    {

        Html.RenderPartial("FlightScheduleCard", item);
    }
</table> 



